package com.portal4kids.view;

import com.opensymphony.xwork2.ActionSupport;
import com.portal4kids.controller.CalendarManager;
import com.portal4kids.model.Calendars;

public class CalendarAction extends ActionSupport{
	private Calendars calendar;
	private CalendarManager calendarController;
	private String date;
	
	public CalendarAction(){
		calendarController = new CalendarManager();
	}
	public String execute(){
		return SUCCESS;		
	}
	
	public String addEventToCalendar(){
		calendar = calendarController.saveEventIntoCalendar(getCalendar(), getDate());
		return SUCCESS;		
	}
	
//------------------------------------------------------------------------------------------------------------------------------------------//
	public Calendars getCalendar() {
		return calendar;
	}
	public void setCalendar(Calendars calendar) {
		this.calendar = calendar;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	

}
